/**
 * @Author：ming
 * @Date：2023/10/28 11:51 AM
 * @Filename：Hot
 */

/**
 * @author ming
 */
public class Hot283 {
    public void moveZeroes(int[] nums) {
        int len = nums.length;
        for (int i = len-1; i >= 0; i--) {
            int temp = nums[i];
            if(temp==0){
                for (int j = i+1; j <len ; j++) {
                    if(nums[j]==0){
                        break;
                    }else {
                        nums[j-1]=nums[j];
                        nums[j]=temp;
                    }
                }
            }
        }
    }
}
